#import "BuildingDataUtility.h"

/**
 * A generic utility class for creating and testing the building
 * collection type.
 * 
 * @author      Justin Hollander
 * @author      James Lin
 * @version     0.9.5
 * @since       0.4.0
 */
@implementation BuildingDataUtility

/**
 * Create the archived data file containing all the static
 * building data needed and supported by this application.
 **/
+ (void)buildBuildingData{

	// For testing the existing data file
	/*BuildingCollection* bc = [[BuildingCollection alloc] initWithFile:@"buildingstore.dat" usingSubdirectory:@"BuildingData"];
	NSArray* buildingList = [bc getDataTypes];
	
	for(Building* b in buildingList)
		NSLog(@"%@", b.name);*/
	
	
	// For rebuilding the data file
	BuildingCollection* bc = [[BuildingCollection alloc] initWithEmptyFile:@"buildingstore.dat" usingSubdirectory:@"BuildingData"];
	
	NSMutableArray* t1 = [NSMutableArray array];
	[t1 addObject:@"cornerstone"];
	[t1 addObject:@"corner stone"];
	[t1 addObject:@"cornerstone bldg"];
	[t1 addObject:@"corner stone bldg"];
	NSMutableArray* t2 = [NSMutableArray array];
	[t2 addObject:@"convo mall"];
	[t2 addObject:@"convocation"];
	[t2 addObject:@"convo building"];
	[t2 addObject:@"convocation building"];
	[t2 addObject:@"convo bldg"];
	[t2 addObject:@"convocation bldg"];
	NSMutableArray* t3 = [NSMutableArray array];
	[t3 addObject:@"lib"];
	[t3 addObject:@"library"];
	[t3 addObject:@"Benet library"];
	[t3 addObject:@"Benett library"];
	[t3 addObject:@"Bennet library"];
	[t3 addObject:@"Bennett library"];
	[t3 addObject:@"WAC bennett"];
	[t3 addObject:@"WAC bennett library"];
	[t3 addObject:@"WAC bennet"];
	[t3 addObject:@"WAC bennet library"];
	[t3 addObject:@"WAC benett"];
	[t3 addObject:@"WAC benet library"];
	[t3 addObject:@"WAC library"];
	[t3 addObject:@"W A C bennett"];
	[t3 addObject:@"W A C  bennett library"];
	[t3 addObject:@"W A C bennet"];
	[t3 addObject:@"W A C  bennet library"];
	[t3 addObject:@"W A C benet"];
	[t3 addObject:@"W A C  benet library"];
	[t3 addObject:@"WAC bennett building"];
	[t3 addObject:@"WAC bennet building"];
	[t3 addObject:@"WAC benett building"];
	[t3 addObject:@"WAC benet building"];
	[t3 addObject:@"WAC bennett bldg"];
	[t3 addObject:@"WAC bennet bldg"];
	[t3 addObject:@"WAC benett bldg"];
	[t3 addObject:@"WAC benet bldg"];
	NSMutableArray* t4 = [NSMutableArray array];
	[t4 addObject:@"MBC"];
	[t4 addObject:@"M B C "];
	[t4 addObject:@"Maggie Benston"];
	[t4 addObject:@"Maggie Benson"];
	[t4 addObject:@"Maggie Benston Building"];
	[t4 addObject:@"Maggie Benson Centre"];
	[t4 addObject:@"Maggie Benson Building"];
	[t4 addObject:@"Maggie Benston Center"];
	[t4 addObject:@"Maggie Benson Center"];
	[t4 addObject:@"Maggie Benston bldg"];
	[t4 addObject:@"Maggie Benson bldg"];
	NSMutableArray* t5 = [NSMutableArray array];
	[t5 addObject:@"AQ"];
	[t5 addObject:@"A Q"];
	[t5 addObject:@"A Q "];
	[t5 addObject:@"Academic quad"];
	NSMutableArray* t6 = [NSMutableArray array];
	[t6 addObject:@"WMC"];
	[t6 addObject:@"W M C "];
	[t6 addObject:@"W M C"];
	[t6 addObject:@"WMX"];
	[t6 addObject:@"W M X "];
	[t6 addObject:@"W M X"];
	[t6 addObject:@"West mall"];
	[t6 addObject:@"West mall centre"];
	[t6 addObject:@"West mall center"];
	[t6 addObject:@"West mall complex"];
	NSMutableArray* t7 = [NSMutableArray array];
	[t7 addObject:@"Gym"];
	[t7 addObject:@"Pool"];
	[t7 addObject:@"rec center"];
	[t7 addObject:@"rec centre"];
	[t7 addObject:@"Lorne Davies Complex"];
	[t7 addObject:@"Lorne Davies"];
	[t7 addObject:@"Lorne Davies Centre"];
	[t7 addObject:@"Lorne Davies Center"];
	NSMutableArray* t8 = [NSMutableArray array];
	[t8 addObject:@"ASB"];
	[t8 addObject:@"A S B"];
	[t8 addObject:@"Applied Sciences"];
	[t8 addObject:@"Applied Science"];
	[t8 addObject:@"Applied Science Building"];
	[t8 addObject:@"Applied Science bldg"];
	[t8 addObject:@"Applied Sciences bldg"];
	NSMutableArray* t9 = [NSMutableArray array];
	[t9 addObject:@"transit exchange"];
	[t9 addObject:@"main bus loop"];
	[t9 addObject:@"bus loop"];
	[t9 addObject:@"busloop"];
	[t9 addObject:@"bus transit"];
	[t9 addObject:@"transit"];
	NSMutableArray* t10 = [NSMutableArray array];
	[t10 addObject:@"halpern center"];
	[t10 addObject:@"halpern"];
	[t10 addObject:@"HC"];
	[t10 addObject:@"H C"];
	[t10 addObject:@"halpern building"];
	[t10 addObject:@"halpern bldg"];
	NSMutableArray* t11 = [NSMutableArray array];
	[t11 addObject:@"education center"];
	[t11 addObject:@"education centre"];
	[t11 addObject:@"EDB"];
	[t11 addObject:@"E D B"];
	[t11 addObject:@"education bldg"];
	[t11 addObject:@"edu building"];
	[t11 addObject:@"edu bldg"];
	NSMutableArray* t12 = [NSMutableArray array];
	[t12 addObject:@"saywell"];
	[t12 addObject:@"SWH"];
	[t12 addObject:@"S W H"];
	[t12 addObject:@"ASSC 1"];
	[t12 addObject:@"ASSC1"];
	[t12 addObject:@"A S S C 1"];
	[t12 addObject:@"arts and social sciences complex"];
	[t12 addObject:@"arts and social science complex"];
	[t12 addObject:@"art and social sciences complex"];
	[t12 addObject:@"art and social science complex"];
	[t12 addObject:@"arts and social sciences centre"];
	[t12 addObject:@"arts and social science centre"];
	[t12 addObject:@"art and social sciences centre"];
	[t12 addObject:@"art and social science centre"];
	[t12 addObject:@"arts and social sciences center"];
	[t12 addObject:@"arts and social science center"];
	[t12 addObject:@"art and social sciences center"];
	[t12 addObject:@"art and social science center"];
	[t12 addObject:@"arts & social sciences complex"];
	[t12 addObject:@"arts & social science complex"];
	[t12 addObject:@"art & social sciences complex"];
	[t12 addObject:@"art & social science complex"];
	[t12 addObject:@"arts & social sciences centre"];
	[t12 addObject:@"arts & social science centre"];
	[t12 addObject:@"art & social sciences centre"];
	[t12 addObject:@"art & social science centre"];
	[t12 addObject:@"arts & social sciences center"];
	[t12 addObject:@"arts & social science center"];
	[t12 addObject:@"art & social sciences center"];
	[t12 addObject:@"art & social science center"];
	NSMutableArray* t13 = [NSMutableArray array];
	[t13 addObject:@"blusson center"];
	[t13 addObject:@"blusson centre"];
	[t13 addObject:@"blusson building"];
	[t13 addObject:@"blusson bldg"];
	[t13 addObject:@"blusson"];
	[t13 addObject:@"blu"];
	[t13 addObject:@"B L U"];
	NSMutableArray* t14 = [NSMutableArray array];
	[t14 addObject:@"technology and science complex 2"];
	[t14 addObject:@"technology and science center 2"];
	[t14 addObject:@"technology and science centre 2"];
	[t14 addObject:@"technology & science center 2"];
	[t14 addObject:@"technology & science centre 2"];
	[t14 addObject:@"tasc2"];
	[t14 addObject:@"tasc 2"];
	[t14 addObject:@"t a s c 2"];
	NSMutableArray* t15 = [NSMutableArray array];
	[t15 addObject:@"shrum science centre building physics"];
	[t15 addObject:@"shrum science centre bldg physics"];
	[t15 addObject:@"shrum science centre building p"];
	[t15 addObject:@"shrum science centre bldg p"];
	[t15 addObject:@"shrum science center building physics"];
	[t15 addObject:@"shrum science center bldg physics"];
	[t15 addObject:@"shrum science center building p"];
	[t15 addObject:@"shrum science center bldg p"];
	[t15 addObject:@"shrum science centre physics"];
	[t15 addObject:@"shrum science centre p"];
	[t15 addObject:@"shrum science center physics"];
	[t15 addObject:@"shrum science center p"];
	[t15 addObject:@"shrum science physics"];
	[t15 addObject:@"shrum science p"];
	[t15 addObject:@"shrum science physics"];
	[t15 addObject:@"shrum science p"];
	[t15 addObject:@"shrum physics"];
	[t15 addObject:@"shrum p"];
	[t15 addObject:@"shrum physics"];
	[t15 addObject:@"shrum p"];
	[t15 addObject:@"SCCB physics"];
	[t15 addObject:@"SCCB p"];
	[t15 addObject:@"S C C B physics"];
	[t15 addObject:@"S C C B p"];
	[t15 addObject:@"SCC physics"];
	[t15 addObject:@"SCC p"];
	[t15 addObject:@"S C C physics"];
	[t15 addObject:@"S C C p"];
	[t15 addObject:@"SCCP"];
	[t15 addObject:@"S C C P"];
	[t15 addObject:@"SCP"];
	[t15 addObject:@"S C P"];
	NSMutableArray* t16 = [NSMutableArray array];
	[t16 addObject:@"shrum science centre building kinesiology"];
	[t16 addObject:@"shrum science centre bldg kinesiology"];
	[t16 addObject:@"shrum science centre building k"];
	[t16 addObject:@"shrum science centre bldg k"];
	[t16 addObject:@"shrum science center building kinesiology"];
	[t16 addObject:@"shrum science center bldg kinesiology"];
	[t16 addObject:@"shrum science center building k"];
	[t16 addObject:@"shrum science center bldg k"];
	[t16 addObject:@"shrum science centre kinesiology"];
	[t16 addObject:@"shrum science centre k"];
	[t16 addObject:@"shrum science center kinesiology"];
	[t16 addObject:@"shrum science center k"];
	[t16 addObject:@"shrum science kinesiology"];
	[t16 addObject:@"shrum science k"];
	[t16 addObject:@"shrum kinesiology"];
	[t16 addObject:@"shrum k"];
	[t16 addObject:@"SCCB kinesiology"];
	[t16 addObject:@"SCCB k"];
	[t16 addObject:@"S C C B kinesiology"];
	[t16 addObject:@"S C C B k"];
	[t16 addObject:@"SCC kinesiology"];
	[t16 addObject:@"SCC k"];
	[t16 addObject:@"S C C kinesiology"];
	[t16 addObject:@"S C C k"];
	[t16 addObject:@"SCCK"];
	[t16 addObject:@"S C C K"];
	[t16 addObject:@"SCK"];
	[t16 addObject:@"S C K"];
	NSMutableArray* t17 = [NSMutableArray array];
	[t17 addObject:@"shrum science centre building biology"];
	[t17 addObject:@"shrum science centre bldg biology"];
	[t17 addObject:@"shrum science centre bldg bio"];
	[t17 addObject:@"shrum science centre building b"];
	[t17 addObject:@"shrum science centre bldg b"];
	[t17 addObject:@"shrum science center building biology"];
	[t17 addObject:@"shrum science center bldg biology"];
	[t17 addObject:@"shrum science center building bio"];
	[t17 addObject:@"shrum science center bldg bio"];
	[t17 addObject:@"shrum science center building b"];
	[t17 addObject:@"shrum science center bldg b"];
	[t17 addObject:@"shrum science centre biology"];
	[t17 addObject:@"shrum science centre bio"];
	[t17 addObject:@"shrum science centre b"];
	[t17 addObject:@"shrum science center biology"];
	[t17 addObject:@"shrum science center bio"];
	[t17 addObject:@"shrum science center b"];
	[t17 addObject:@"shrum science biology"];
	[t17 addObject:@"shrum science bio"];
	[t17 addObject:@"shrum science b"];
	[t17 addObject:@"shrum biology"];
	[t17 addObject:@"shrum bio"];
	[t17 addObject:@"shrum b"];
	[t17 addObject:@"SCCB biology"];
	[t17 addObject:@"SCCB bio"];
	[t17 addObject:@"SCCB b"];
	[t17 addObject:@"S C C B biology"];
	[t17 addObject:@"S C C B bio"];
	[t17 addObject:@"S C C B b"];
	[t17 addObject:@"SCC biology"];
	[t17 addObject:@"SCC bio"];
	[t17 addObject:@"SCC b"];
	[t17 addObject:@"S C C biology"];
	[t17 addObject:@"S C C bio"];
	[t17 addObject:@"S C C b"];
	[t17 addObject:@"SCCB"];
	[t17 addObject:@"S C C B"];
	[t17 addObject:@"SCB"];
	[t17 addObject:@"S C B"];
	NSMutableArray* t18 = [NSMutableArray array];
	[t18 addObject:@"shrum science centre building chemistry"];
	[t18 addObject:@"shrum science centre bldg chemistry"];
	[t18 addObject:@"shrum science centre bldg chem"];
	[t18 addObject:@"shrum science centre building c"];
	[t18 addObject:@"shrum science centre bldg c"];
	[t18 addObject:@"shrum science center building chemistry"];
	[t18 addObject:@"shrum science center bldg chemistry"];
	[t18 addObject:@"shrum science center building chem"];
	[t18 addObject:@"shrum science center bldg chem"];
	[t18 addObject:@"shrum science center building c"];
	[t18 addObject:@"shrum science center bldg c"];
	[t18 addObject:@"shrum science centre chemistry"];
	[t18 addObject:@"shrum science centre chem"];
	[t18 addObject:@"shrum science centre c"];
	[t18 addObject:@"shrum science center chemistry"];
	[t18 addObject:@"shrum science center chem"];
	[t18 addObject:@"shrum science center c"];
	[t18 addObject:@"shrum science chemistry"];
	[t18 addObject:@"shrum science chem"];
	[t18 addObject:@"shrum science c"];
	[t18 addObject:@"shrum chemistry"];
	[t18 addObject:@"shrum chem"];
	[t18 addObject:@"shrum c"];
	[t18 addObject:@"SCCB chemistry"];
	[t18 addObject:@"SCCB chem"];
	[t18 addObject:@"SCCB c"];
	[t18 addObject:@"S C C B chemistry"];
	[t18 addObject:@"S C C B chem"];
	[t18 addObject:@"S C C B c"];
	[t18 addObject:@"SCC chemistry"];
	[t18 addObject:@"SCC chem"];
	[t18 addObject:@"SCC c"];
	[t18 addObject:@"S C C chemistry"];
	[t18 addObject:@"S C C chem"];
	[t18 addObject:@"S C C c"];
	[t18 addObject:@"SCCC"];
	[t18 addObject:@"S C C C"];
	[t18 addObject:@"SCC"];
	[t18 addObject:@"S C C"];
	
	
	GPSLocation* g1 = [[GPSLocation alloc] initWithDetails:49.278182 
											 lon:-122.912579];
	GPSLocation* g2 = [[GPSLocation alloc] initWithDetails:49.279230 
											 lon:-122.919109];
	GPSLocation* g3 = [[GPSLocation alloc] initWithDetails:49.279296
											 lon:-122.918761];
	GPSLocation* g4 = [[GPSLocation alloc] initWithDetails:49.278683
											 lon:-122.919200];
	GPSLocation* g5 = [[GPSLocation alloc] initWithDetails:49.278932
											 lon:-122.916650];
	GPSLocation* g6 = [[GPSLocation alloc] initWithDetails:49.279932
											 lon:-122.921898];
	GPSLocation* g7 = [[GPSLocation alloc] initWithDetails:49.279391
											 lon:-122.921489];
	GPSLocation* g8 = [[GPSLocation alloc] initWithDetails:49.277396
											 lon:-122.914278];
	GPSLocation* g9 = [[GPSLocation alloc] initWithDetails:49.278555 
													   lon:-122.912531];
	GPSLocation* g10 = [[GPSLocation alloc] initWithDetails:49.279372 // HC
														lon:-122.917884];
	GPSLocation* g11 = [[GPSLocation alloc] initWithDetails:49.279908  // EDB
														lon:-122.915720];
	GPSLocation* g12 = [[GPSLocation alloc] initWithDetails:49.279402 // SWH
														lon:-122.914175];
	GPSLocation* g13 = [[GPSLocation alloc] initWithDetails:49.279177 // BLU 
														lon:-122.912873];
	GPSLocation* g14 = [[GPSLocation alloc] initWithDetails:49.277197 // TASC2 
														lon:-122.916314];
	GPSLocation* g15 = [[GPSLocation alloc] initWithDetails:49.277853 // SCP
														lon:-122.916248];
	GPSLocation* g16 = [[GPSLocation alloc] initWithDetails:49.277724 // SCK
														lon:-122.914850];
	GPSLocation* g17 = [[GPSLocation alloc] initWithDetails:49.277819 // SCB
														lon:-122.916745];
	GPSLocation* g18 = [[GPSLocation alloc] initWithDetails:49.278900 // SCC
														lon:-122.918169];

	Building* b1 = [[Building alloc] initWithParam:@"Cornerstone Building" 
									   gpsLocation:g1 tagList:t1];
	Building* b2 = [[Building alloc] initWithParam:@"Convocation Mall" 
									   gpsLocation:g2 tagList:t2];
	Building* b3 = [[Building alloc] initWithParam:@"WAC Bennett Library" 
									   gpsLocation:g3 tagList:t3];
	Building* b4 = [[Building alloc] initWithParam:@"Maggie Benston Centre" 
									   gpsLocation:g4 tagList:t4];
	Building* b5 = [[Building alloc] initWithParam:@"Academic Quadrangle" 
									   gpsLocation:g5 tagList:t5];
	Building* b6 = [[Building alloc] initWithParam:@"West Mall Complex" 
									   gpsLocation:g6 tagList:t6];
	Building* b7 = [[Building alloc] initWithParam:@"Recreation Centre" 
									   gpsLocation:g7 tagList:t7];
	Building* b8 = [[Building alloc] initWithParam:@"Applied Sciences Building" 
									   gpsLocation:g8 tagList:t8];
	Building* b9 = [[Building alloc] initWithParam:@"Transit Loop" 
									   gpsLocation:g9 tagList:t9];
	Building* b10 = [[Building alloc] initWithParam:@"Halpern Centre" 
									   gpsLocation:g10 tagList:t10];
	Building* b11 = [[Building alloc] initWithParam:@"Education Building" 
									   gpsLocation:g11 tagList:t11];
	Building* b12 = [[Building alloc] initWithParam:@"Saywell Hall" 
									   gpsLocation:g12 tagList:t12];
	Building* b13 = [[Building alloc] initWithParam:@"Blusson Hall" 
									   gpsLocation:g13 tagList:t13];
	Building* b14 = [[Building alloc] initWithParam:@"Technology & Science Complex 2" 
									   gpsLocation:g14 tagList:t14];
	Building* b15 = [[Building alloc] initWithParam:@"Shrum Science Centre Physics" 
										gpsLocation:g15 tagList:t15];
	Building* b16 = [[Building alloc] initWithParam:@"Shrum Science Centre Kinesiology" 
										gpsLocation:g16 tagList:t16];
	Building* b17 = [[Building alloc] initWithParam:@"Shrum Science Centre Biology" 
										gpsLocation:g17 tagList:t17];
	Building* b18 = [[Building alloc] initWithParam:@"Shrum Science Centre Chemistry" 
										gpsLocation:g18 tagList:t18];
	
	[bc addDataType:b1];
	[bc addDataType:b2];
	[bc addDataType:b3];
	[bc addDataType:b4];
	[bc addDataType:b5];
	[bc addDataType:b6];
	[bc addDataType:b7];
	[bc addDataType:b8];
	[bc addDataType:b9];
	[bc addDataType:b10];
	[bc addDataType:b11];
	[bc addDataType:b12];
	[bc addDataType:b13];
	[bc addDataType:b14];
	[bc addDataType:b15];
	[bc addDataType:b16];
	[bc addDataType:b17];
	[bc addDataType:b18];
	
	//Building* foundBuilding;// = [ParsingUtilities getLocation:@"lalalalala  sdfsr f busloop efrefe" buildingCollection:bc ];
	//foundBuilding = [ParsingUtilities getLocation:@"lalalalala  sdfsr f SFU Bus Loop efrefe" buildingCollection:bc ];
	//foundBuilding = [ParsingUtilities getLocation:@"buslooplala  sdfsr f efrefe" buildingCollection:bc ];
	//foundBuilding = [ParsingUtilities getLocation:@"la .busloops lalalala  sdfsr f efrefe" buildingCollection:bc ];
	//foundBuilding = [ParsingUtilities getLocation:@"lalalalala  sdfsr f efrefe ,busloop!" buildingCollection:bc ];
	//foundBuilding = [ParsingUtilities getLocation:@"lalalalala  sdfsr f efrefebusloop" buildingCollection:bc ];
	//foundBuilding = [ParsingUtilities getLocation:@"bus loop lalalalala  sdfsr f efrefe" buildingCollection:bc ];
	//foundBuilding = [ParsingUtilities getLocation:@"lalalalala  bus. loop sdfsr f efrefe" buildingCollection:bc ];
	//foundBuilding = [ParsingUtilities getLocation:@"busloop! lalalalala  sdfsr f efrefe" buildingCollection:bc ];
	
	//[buildingList release];
	//[g1 release];
	//[b1 release];
}

@end
